<template>
  <div>
    <el-dialog title="动态分区" :visible.sync="openDia" :close-on-click-modal="false">
      <div style="height: 500px;">
        <HorizontalDrag ref="horizontalDrag" :rightWidth="100">
          <template #left>
            <VerticalDrag ref="verticalDrag" :bottomHeight="100">
              <template #top>
                <div class="con" style="background-color: #67C23A"></div>
              </template>
              <template #bottom>
                <VerticalDrag ref="verticalDrag">
                  <template #top>
                    <div class="con" style="background-color: #4bf9ff"></div>
                  </template>
                  <template #bottom>
                    <div class="con" style="background-color: #409EFF"></div>
                  </template>
                </VerticalDrag>
              </template>
            </VerticalDrag>
          </template>
          <template #right>
            <!-- <div class="con" style="background-color: #F56C6C"></div> -->
            <VerticalDrag ref="verticalDrag">
                  <template #top>
                    <div class="con" style="background-color: #4bf9ff"></div>
                  </template>
                  <template #bottom>
                    <div class="con" style="background-color: #409EFF"></div>
                  </template>
                </VerticalDrag>
          </template>
        </HorizontalDrag>
      </div>

      <span slot="footer">
        <el-button @click="openDia = false">关 闭</el-button>
      </span>
    </el-dialog>
  </div>
</template>
<script>
import HorizontalDrag from '@/components/HorizontalDrag.vue';
import VerticalDrag from '@/components/VerticalDrag.vue'
export default {
  components: {
    HorizontalDrag,
    VerticalDrag
  },
  props: {
    open: {
      type: Boolean,
      default: false
    }
  },
  data() {
    return {
    }
  },
  computed: {
    openDia: {
      get() {
        return this.open;
      },
      set(val) {
        this.$emit("update:open", val);
      },
    },
  },
  methods: {

  }
}
</script>
<style scoped>
.con {
  width: 100%;
  height: 100%;
}
</style>